<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/security/tags" prefix="acegi" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<c:set var="contextPath" value="${pageContext.request.contextPath}" />
<acegi:authentication property="principal" var="sgdUsuarioAcegi" />

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>CREDISEGUROS</title>
    <link type="text/css" href='${contextPath}/resources/css/stylesheet.css' rel="stylesheet" />
	<style type="text/css">
		.linkOpcion{
		    background: url(${contextPath}/resources/images/marcoSupCen.png) repeat-x scroll 0 1px #FBE3B3;
		    border: 1px solid #DAAB5B;
		    border-radius: 10px 10px 10px 10px;
		    color: #666666;
		    display: block;
		    float: left;
		    padding-bottom: 5px;
		    margin-right: 15px;
		    margin-top: 15px;
		    padding-top: 35px;
		    text-align: center;
		    text-decoration: none;
		    width: 300px;
		    font-family:arial;
		    font-size: 14px;
		}
		.linkOpcion:hover{
			background: #f9f9f9;
		}
		#logo{
			display: block;
		    float: right;
			padding-top: 1px;
			margin-top: 20px;
			margin-right: 60px;
			width:266px;
			height:39px;
			background: url(${contextPath}/resources/images/logoCrediseguros.png) no-repeat
		}
	</style>
	<script type="text/javascript" src="${contextPath}/resources/js/home.js"></script>
	<script type="text/javascript">
   		Ext.onReady(function(){
   			Viewport.initWindow(AsgHome.initConfig());
   		});
   	</script>
</head>
<body>
	<div id="homeMenu" style="dislay: none;">
		<div style='width:1024px;height:768px;background:url(${contextPath}/resources/images/background/fondoLogin.jpg); border:2px groove white;margin:auto'>
			<div id="logo"></div>
			<div style="width: 100%; clear: both;"></div>
			<div style='height:100%;'>
				<c:if test="${not empty param.ssac}">
					<br />
					<div style="font-weight: bold; text-align: center; margin-top: 20px; font-size: 13px; color: darkred;">
						Acceso Denegado, Favor Comuniquese con el Administrador
					</div>
				</c:if>
				<acegi:authorize ifAnyGranted="ROLE_CLIENTE_POLIZA,ROLE_ABONO,ROLE_RECLAMO,ROLE_PENDIENTE,ROLE_RENOVACION,ROLE_VENTA">
				<table cellpadding="0" cellspacing="0" style="margin: 20px auto 0;clear: both;">
					<tr><td class='marcoSupIzq'></td><td class='marcoSupCen'></td><td class='marcoSupDer'></td></tr>
					<tr>
						<td class='marcoIzq'></td>
						<td class='marco'>
							<div style="margin: 15px 0 15px 10px;display:table;width: 635px;">
								<acegi:authorize ifAnyGranted="ROLE_CLIENTE_POLIZA">
								<a class="linkOpcion" href="${contextPath}/seguros/view">CLIENTES / POLIZAS</a>
								</acegi:authorize>
								<acegi:authorize ifAnyGranted="ROLE_ABONO">
								<a class="linkOpcion" href="${contextPath}/abonos/view">ABONOS</a>
								</acegi:authorize>
								<acegi:authorize ifAnyGranted="ROLE_RECLAMO">
								<a class="linkOpcion" href="${contextPath}/reclamos/view">RECLAMOS</a>
								</acegi:authorize>
								<acegi:authorize ifAnyGranted="ROLE_PENDIENTE">
								<a class="linkOpcion" href="${contextPath}/pendientes/view">PENDIENTES</a>
								</acegi:authorize>
								<acegi:authorize ifAnyGranted="ROLE_RENOVACION">
								<a class="linkOpcion" href="${contextPath}/renovaciones/view">RENOVACIONES</a>
								</acegi:authorize>
								<acegi:authorize ifAnyGranted="ROLE_VENTA">
								<a class="linkOpcion" href="${contextPath}/ventas/view">VENTAS</a>
								</acegi:authorize>
								
							</div>
						</td>
						<td class='marcoDer'></td>
					</tr>
					<tr><td class='marcoInfIzq'></td><td class='marcoInfCen'></td><td class='marcoInfDer'></td></tr>
				</table>
				</acegi:authorize>
				<acegi:authorize ifAnyGranted="ROLE_CONFIGURACION,ROLE_REPORTE">
				<table cellpadding="0" cellspacing="0" style="margin: 20px auto 0;clear: both;">
					<tr><td class='marcoSupIzq'></td><td class='marcoSupCen'></td><td class='marcoSupDer'></td></tr>
					<tr>
						<td class='marcoIzq'></td>
						<td class='marco'>
							<div style="margin: 15px 0 15px 10px;display:table;width: 635px;">
								<acegi:authorize ifAnyGranted="ROLE_CONFIGURACION">
								<a class="linkOpcion" href="${contextPath}/admin/">CONFIGURACI&Oacute;N</a>
								</acegi:authorize>
								<acegi:authorize ifAnyGranted="ROLE_REPORTE">
								<a class="linkOpcion" href="${contextPath}/reportes/">REPORTES</a>
								</acegi:authorize>
							</div>
						</td>
						<td class='marcoDer'></td>
					</tr>
					<tr><td class='marcoInfIzq'></td><td class='marcoInfCen'></td><td class='marcoInfDer'></td></tr>
				</table>
				</acegi:authorize>
			</div>
		</div>
	</div>
</body>
</html>